package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.Destination;
import cn.wolfcode.luowowo.common.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DestinationMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Destination record);

    Destination selectByPrimaryKey(Long id);

    List<Destination> selectAll();

    int updateByPrimaryKey(Destination record);

    /**
     * 分页查询
     * @param qo
     * @return
     */
    List<Destination> selectForList(QueryObject qo);

    /**
     * 根据关联目的地id查询id,name
     * @param regions 数组格式的关联目的地id
     * @return  id,name
     */
    List<Destination> selectByIds(Long[] regions);

    //注意:不贴该注解那么就拿不到值
    List<Destination> selectByRegionId(@Param("regionId") Long regionId);
}